#ifndef USERSERVICE_H
#define USERSERVICE_H

#include <QObject>
#include "protocol.h"
#include <memory>
class TcpUserConnect;
class UserService : public QObject
{
    Q_OBJECT
public:
    explicit UserService(QObject *parent = nullptr);

    void _doUserRegister(std::shared_ptr<PDU> recvPDU,TcpUserConnect* UserPtr);

    void _doUserLogin(std::shared_ptr<PDU> recvPDU,TcpUserConnect* UserPtr);

    void _doDownLine(std::shared_ptr<PDU> recvPDU,TcpUserConnect* UserPtr);

signals:
    void ThrowMatchTcpUser(TcpUserConnect* TcpUser,QString UserName);

    void ThrowDownLine(TcpUserConnect* TcpUser,QString UserName);
};

#endif // USERSERVICE_H
